package com.magirard.project.camera 
{
	import flash.geom.Matrix3D;
	import flash.geom.Vector3D;
	/**
	 * ...
	 * @author Marc Andre Girard
	 */
	public class BaseCamera 
	{
		private var mViewMatrix:Matrix3D;
		
		
		public function BaseCamera() 
		{
			mViewMatrix = new Matrix3D();
		}
		
		public function MoveRight(aLength:Number):void
		{
			mViewMatrix.appendTranslation( -aLength, 0, 0);
		}
		
		public function MoveLeft(aLength:Number):void
		{
			mViewMatrix.appendTranslation(aLength, 0, 0);
		}
		
		public function MoveForward(aLength:Number):void
		{
			mViewMatrix.appendTranslation(0, 0, aLength);
		}
		
		public function MoveBackward(aLength:Number):void
		{
			mViewMatrix.appendTranslation(0, 0, -aLength);
		}
		
		public function MoveUp(aLength:Number):void
		{
			mViewMatrix.appendTranslation(0, aLength, 0);
		}
		
		public function MoveDown(aLength:Number):void
		{
			mViewMatrix.appendTranslation(0, -aLength, 0);
		}
		
		public function RotateAroundXAxis(aDegree:Number):void
		{
			mViewMatrix.appendRotation(aDegree, Vector3D.X_AXIS);
		}
		
		public function RotateAroundYAxis(aDegree:Number):void
		{
			mViewMatrix.appendRotation(aDegree, Vector3D.Y_AXIS);
		}
		
		public function RotateAroundZAxis(aDegree:Number):void
		{
			mViewMatrix.appendRotation(aDegree, Vector3D.Z_AXIS);
		}
		
		public function get ViewMatrix():Matrix3D 
		{
			return mViewMatrix;
		}
		
		public function set ViewMatrix(value:Matrix3D):void 
		{
			mViewMatrix = value;
		}
		
	}

}